function myInstanceof(obj,o){
    if(!isObj(o)){
        return false
    }
    if(o.__proto__===obj.prototype){
        return true
    }else {
       return myInstanceof(obj,o.__proto__)
    }
    function isObj(o){
        if(typeof o ==='object'&&o!==null)
            return true
        return false
    }
}
class Cat{
    constructor(name,age){
        this.name = name
        this.age = age
    }
}
const cat = new Cat('喵喵',18)
console.log(myInstanceof(Object,{}))
console.log(myInstanceof(Array,[]))
console.log(myInstanceof(Map,new Map()))
console.log(myInstanceof(Function,()=>{}))
const fn = ()=>{}
console.log(typeof fn ==='object')
console.log(cat instanceof Object)
console.log(myInstanceof(Object,cat))
